<template>
  <basic-card
    :title="$t('menu.screen_view')"
    :iconClass="'iconfont icon-wurenji3'">
    <div class="really-time-container">
      <div class="tree-container">
        <el-tree :data="groupTree"></el-tree>
      </div>
      <div class="content-container">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="单屏" name="first">
            <div class="monitor-container">
              <div class="monitor-1">
                <div class="str">无信号</div>
              </div>
            </div>
          </el-tab-pane>
          <el-tab-pane label="四分屏" name="second">
            <div class="monitor-container">
              <div class="monitor-4">
                <div class="str">无信号</div>
              </div>
              <div class="monitor-4">
                <div class="str">无信号</div>
              </div>
              <div class="monitor-4">
                <div class="str">无信号</div>
              </div>
              <div class="monitor-4">
                <div class="str">无信号</div>
              </div>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </basic-card>
</template>
<script lang="ts">
import Vue from 'vue'
import BasicCard from "@/components/Basic/Card/BasicCard.vue";
import BasicTable from "@/components/Basic/Table/BasicTable.vue";
import BasicDeleteDialop from "@/components/Basic/Dialop/BasicDeleteDialop.vue";

export default Vue.extend({
  components: { BasicCard, BasicTable, BasicDeleteDialop },
  data() {
    return {
      activeName: "first",
      groupTree: [
        {
          label: "一级 1",
          children: [
            {
              label: "二级 1-1",
              children: [
                {
                  label: "三级 1-1-1",
                },
              ],
            },
          ],
        },
        {
          label: "一级 2",
          children: [
            {
              label: "二级 2-1",
              children: [
                {
                  label: "三级 2-1-1",
                },
              ],
            },
            {
              label: "二级 2-2",
              children: [
                {
                  label: "三级 2-2-1",
                },
              ],
            },
          ],
        },
        {
          label: "一级 3",
          children: [
            {
              label: "二级 3-1",
              children: [
                {
                  label: "三级 3-1-1",
                },
              ],
            },
            {
              label: "二级 3-2",
              children: [
                {
                  label: "三级 3-2-1",
                },
              ],
            },
          ],
        },
      ],
      monitorList: [
        {
          name: "监控一",
          position: "位置一",
        },
        {
          name: "监控二",
          position: "位置二",
        },
        {
          name: "监控三",
          position: "位置三",
        },
        {
          name: "监控四",
          position: "位置四",
        },
      ],
    };
  }
})
</script>
<style lang="scss" scoped>
.really-time-container {
  width: 100%;
  display: flex;

  .tree-container {
    width: 200px;
    padding-top: 30px;
    flex-shrink: 0;
  }

  .content-container {
    flex-grow: 1;
    
    .monitor-container {
      display: flex;
      flex-wrap: wrap;

      .monitor-1 {
        color: #fff;
        width: 98%;
        height: 400px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #000;
      }

      .monitor-4 {
        color: #fff;
        width: 49%;
        height: 200px;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        border: 1px solid #cccccc;
      }
    }
  }
}
</style>